import { baseRequest } from "@/utils/request";

const request = (url, ...arg) => baseRequest(`/api/production/${url}`, ...arg)

export default {
    //获取产品信息
    queryProduct(data) {
        return request('QueryProductAsync', data, 'get')
    },
    //新增产品信息
    addProduct(data) {
        return request('AddProductAsync', data)
    },
    //获取该id下的产品信息
    queryProductById(data) {
        return request('QueryProductionByIdAsync', data, 'get')
    },
    //产品编辑
    editProduct(data) {
        return request('EditProductAsync', data)
    },
    //产品批量删除
    rangeDelProduction(data) {
        return request('RangeDelProductionAsync', data)
    },
    //绑定产品下拉框
    bindProduct(data) {
        return request('BindProductionAsync', data, 'get')
    },
    //导出产品信息
    exportProduct(data) {
        return request('ExportAsync', data, 'post', {
            responseType: 'blob'
        })
    }
} 